using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace Devtodo;

public sealed partial class MainWindow : Window
{
  public MainWindow()
  {
    InitializeComponent();
    ContentFrame.Navigate(typeof(Pages.Todo));
  }
  async void ChangePage(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
  {
    var selectedItem = (NavigationViewItem)args.SelectedItem;
    if ((string)selectedItem.Tag == "todo")
    {
      ContentFrame.Navigate(typeof(Pages.Todo));
    }
    if ((string)selectedItem.Tag == "update")
    {
      ContentFrame.Navigate(typeof(Pages.Update));
    }
    if ((string)selectedItem.Tag == "version")
    {
      ContentFrame.Navigate(typeof(Pages.Version));
    }
    if ((string)selectedItem.Tag == "project")
    {
      ContentFrame.Navigate(typeof(Pages.Project));
    }
    if ((string)selectedItem.Tag == "log")
    {
      ContentFrame.Navigate(typeof(Pages.Log));
    }
    if (args.IsSettingsSelected)
    {
      ContentFrame.Navigate(typeof(Pages.Setting));
    }
  }
}